#include <assert.h>
#include "employeedao_factory.h"
#include "employeedao_stub4web.h"
#include "employeedao_stub4app.h"
//#include "employeedao.h"

using namespace erp::employee::dao;

bool CEmployeeDaoFactory::s_EmployeeDaoInit = false;

IEmployeeDao* CEmployeeDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CEmployeeDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_EmployeeDaoInit)
        {
            int iRetCode = CEmployeeDao::Initialize();
            assert(iRetCode == 0);
            s_EmployeeDaoInit = true;
        }   	
        return (new CEmployeeDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IEmployeeDaoAsyc* CEmployeeDaoFactory::GetAsycObject()
{
	return (new CEmployeeDaoStub4App);
}
